<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'test_path_variable.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
    <a href="testPathVariable/1">testPathVariable</a><br>
    
    <!-- rest 风格的 CRUD URL
    	 增: /order 		POST
    	 删: /order/id 	DELETE
    	 改: /order/id 	PUT
    	 查: /order/id 	GET -->
    <h4><a href="testRestGet/1">testRestGet</a></h4><br>
    <form action="testRestPost" method="post">
    	Test REST post:<input type="submit" value="submit">
    </form><br>
    <form action="testRestDelete/1" method="post">
    	<!-- 需要有隐藏域, name值必须是 _method, 才能被 HiddenHttpMethodFilter 识别, value 为目标请求方式 -->
    	<input type="hidden" name="_method" value="delete">
    	Test REST delete:<input type="submit" value="submit">
    </form><br>
    <form action="testRestPut/1" method="post">
    	<input type="hidden" name="_method" value="PUT">
    	Test REST put:<input type="submit" value="submit">
    </form><br>
  </body>
</html>
